-
Notifications
You must be signed in to change notification settings - Fork 17
VBX-292: add APIs for working with Stardog Cloud public API #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove redundant descriptions and verbose explanations to improve readability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add local Stardog logo and configure in Sphinx - Update theme styling with custom nav header background - Remove external logo image from index - Remove redundant docs README
Remove detailed installation, examples, and contributing sections that are now comprehensively covered in the documentation. Replace with concise overview and clear links to specific doc sections.
Update description in pyproject.toml to reflect that pystardog supports both Stardog servers and Stardog Cloud functionality.
Add respx library for HTTP request mocking in tests
- Add abstract base_url property to BaseClient - Implement base_url property in Client and AsyncClient - Fix StardogCloudAPIEndpoints enum usage with .value
- Use base_url property instead of internal _client.base_url - Test with StardogCloudAPIEndpoints enum values
- Replace custom MockClient with real Client/AsyncClient instances - Use respx library for HTTP request mocking - Split tests into sync and async test classes - Verify actual HTTP headers and request behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved a lot of this content to the readthedocs site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some doc cleanup included here too while I was adding the new docs for cloud.
mhgrove
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some non-code changes. Code looks good, tests ran locally.
| """Whether Voicebox should use reasoning or not in its queries to the Stardog database.""" | ||
|
|
||
|
|
||
| class VoiceboxAction(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this correspond to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the actions returned in the api response for ask and generate-query.
|
|
||
| @computed_field # type: ignore[misc] | ||
| @property | ||
| def interpreted_question(self) -> Optional[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know the front end uses this now, but it doesn't exist w/ v3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v3 isn't exposed in the public API yet.
Co-authored-by: Michael Grove <mhgrove@users.noreply.github.com>
Co-authored-by: Michael Grove <mhgrove@users.noreply.github.com>
Co-authored-by: Michael Grove <mhgrove@users.noreply.github.com>
Co-authored-by: Michael Grove <mhgrove@users.noreply.github.com>
mhgrove
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
Just went through the project and changes - looks good! |
Overview
stardog.cloudsubpackage containing modules for working with the Stardog Cloud APIstardog.cloud.client.Clientor asynchronousstardog.cloud.client.AsyncClient.VoiceboxAppwhich is the entrypoint for working with Voicebox. This pattern should be able to be extended if and when we extend the public api to contain non voicebox related apis.API Usage
Example using synchronous client:
Output:
Example Using asynchronous
AsyncClient:Output: